package com.spring.business.configure.pojo.vo;

import io.swagger.annotations.ApiModelProperty;

import java.util.List;
import java.util.StringJoiner;

/**
 * 字典响应对象
 */
public class DictTypeVO
{
	@ApiModelProperty(value = "字典类型")
	private String code;

	@ApiModelProperty(value = "字典值列表")
	private List<DictValueVO> dictValueVOList;

	public String getCode()
	{
		return code;
	}

	public List<DictValueVO> getDictValueVOList()
	{
		return dictValueVOList;
	}

	private DictTypeVO(String code, List<DictValueVO> dictValueVOList)
	{
		this.code = code;
		this.dictValueVOList = dictValueVOList;
	}

	@Override
	public String toString()
	{
		return new StringJoiner(", ", DictTypeVO.class.getSimpleName() + "[", "]").add("code='" + code + "'").add("dictValueVOList=" + dictValueVOList).toString();
	}

	/**
	 * 初始化链式调用内部类
	 * @return
	 */
	public static Builder builder()
	{
		return new Builder();
	}

	/**
	 * 链式调用内部类
	 */
	public static class Builder
	{
		private String code;

		private List<DictValueVO> dictValueVOList;

		public Builder code(String code)
		{
			this.code = code;
			return this;
		}

		public Builder dictValueVOList(List<DictValueVO> dictValueVOList)
		{
			this.dictValueVOList = dictValueVOList;
			return this;
		}

		public DictTypeVO build()
		{
			return new DictTypeVO(code, dictValueVOList);
		}
	}
}
